package com.victualler.business.inventory.repository;


import com.victualler.business.inventory.dto.GoodsModelInventoryDto;
import com.victualler.business.inventory.dto.GoodsModelInventoryScanDto;
import com.victualler.core.base.repository.IBaseQueryRepository;
import com.victualler.business.inventory.entity.GoodsInventoryDao;

import java.util.List;


/**
 * @author Guoshichang
 * @function 封装用于复杂sql查询的API. 为每个实体的repository层提供便利操作
 */
public interface GoodsInventoryQueryRepository extends IBaseQueryRepository<GoodsInventoryDao,Long> {

    /**
     * 获取商品型号对应的库存
     * @param goodsId 商品id
     * @return GoodsModelInventoryDto
     */
    public List<GoodsModelInventoryDto> getGoodsModelInventory(Long goodsId);

    /**
     * 获取商品型号对应的库存
     * @param barCode 条形码
     * @return GoodsModelInventoryDto
     */
    public GoodsModelInventoryScanDto getGoodsModelInventoryScan(String barCode);
}
